<?php

class Admin extends My_Controller {

    public function __construct() {
        parent::__construct();
    }
    
    public function index() {
        $this->controlPanel();
    }
    
    public function controlPanel(){
        // Add title
        $this->template->add_title('Home page');
        // Build data
        $data['info'] = array(
            '0' => array(
                'id' => '001',
                'name' => 'kevin',
                'age' => '20',
                'result' => array(
                    '0' => array(
                        'point1' => 9,
                        'point2' => 8,
                        'point3' => 7
                    )
                )
            ),
            '1' => array(
                'id' => '002',
                'name' => 'kenny',
                'age' => '20',
                'result' => array(
                    '0' => array(
                        'point1' => 7,
                        'point2' => 8,
                        'point3' => 9
                    )
                )
            )
        );
        // Parser data
        $data_sidebar = array(
            'menu' => 'index'
       );
       $this->template->parse_view('sidebarleft','default/sidebarleft/sidebarleft',$data_sidebar);
        $this->template->parse_view('content', 'default/block/content', $data);
        // Render template
        $this->template->render();
    }
    
    function default_html(){
        $data = array();
        
        $data_sidebar = array(
            'menu' => 'cauhinh'
        );
        $this->template->parse_view('sidebarleft','default/sidebarleft/sidebarleft',$data_sidebar);
        $this->template->parse_view('content', 'default/content/default_page', $data);
        $this->template->render();
    }
    
}